A server may return a result set to a client in response to a client query. Some result sets may contain a relatively small numbers of records. In which case, the server may return the entire result set to the client in response to the query. However, other result sets may include dozens, hundreds, or even thousands of records. In such cases, it is not practical for the server to return the entire result set to the client due to performance penalties.
An application programming interface (API) may use paging to limit the number of records returned to the client. Most APIs typically return one page at a time to a client and limit the number of records included within each page. For example, if a result set includes 100 records, the API may paginate the records into ten pages having ten records per page. The API then returns only the first page of the result set, which includes only records one through ten, to the client. If the client wants record eleven, the client graphical user interface (GUI) must request the next page from the server. The next page returned to the client, by the server in this example, would include records eleven through twenty.
Although pagination assists the server in limiting the number of records returned to a client at one time, a user associated with the client must scroll and/or page through each page of the result set one page at a time to locate a particular record of interest to the user. In cases where a first page returned to the client does not include the desired record, the user is typically required to scroll through result set one page at a time until the desired record is located. This process can be a time-consuming, tedious, and inefficient process for users.